/**********************************************
 * 	Verb.java								  *
 *  Course: CS3343							  *
 *  Version: 2.0     Release 1				  *
 *  Last Modified : 22 MAR 2013			      *
 **********************************************/
package checker;


public class Verb extends Word {

		public Verb (String sign){
			super(sign,"Verb");
		}
		public Verb(){
			super("[v]","Noun");
		}
	
	public  boolean isOfType(String word){
		//get all the words starting with the letter same as the initial letter of the input word
		//the second argument is the type of words to be retrieved, in this case, verbs
		//the return value is an array containing all the relevant words
		String[] verbs = fileIO.getWordCategory(word, "verb");
		
		//simply compare each value in the array with the input word
		for(int i = 0; i < verbs.length; i++){
			if(verbs[i].equalsIgnoreCase(word))
				//returning true means this is a verb
				return true;
		}
		return false;
	}
	
}
